import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  base:'/silver/',
  hashbang: true,
  history: false,//这个参数改为false就可以了
  saveScrollPosition: true,
  suppressTransitionError: true,
  routes: [
    {
      path: '/Auth', //认证
      name: 'Auth',
      meta: {
        title: '获取认证'
      },
      component: resolve => require(['pages/Auth'], resolve) 
    },
    {
      path: '/', //首页
      name: 'Index',
      meta: {
        title: '个人中心'
      },
      component: resolve => require(['pages/Index'], resolve) 
    },
    {
      path: '/Index',//首页
      name: 'Index',
      meta: {
        title: '个人中心'
      },
      component: resolve => require(['pages/Index'], resolve) 
    },
    {
      path: '/Register',//注册页
      name: 'Register',
      meta: {
        title: '注册'
      },
      component: resolve => require(['pages/Register'], resolve) 
    },
    {
      path: '/CommAuth',//根据openid跳转并存储openid
      name: 'CommAuth',
      meta: {
        title: '获取认证'
      },
      component: resolve => require(['pages/CommAuth'], resolve) 
    },
    {
      path: '/RNAuth',//实名认证
      name: 'RNAuth',
      meta: {
        title: '实名认证'
      },
      component: resolve => require(['pages/RNAuth'], resolve) 
    },
    {
      path: '/Pay',//收银页
      name: 'Pay',
      meta: {
        title: '收银'
      },
      component: resolve => require(['pages/Pay'], resolve) 
    },
    {
      path: '/Complete',//支付完成页
      name: 'Complete',
      meta: {
        title: '支付完成'
      },
      component: resolve => require(['pages/Complete'], resolve) 
    },
    {
      path: '/ChoseCard',//选择银行卡页
      name: 'ChoseCard',
      meta: {
        title: '选择信用卡'
      },
      component: resolve => require(['pages/ChoseCard'], resolve) 
    },
    {
      path: '/AddCard',//添加信用卡页
      name: 'AddCard',
      meta: {
        title: '添加信用卡'
      },
      component: resolve => require(['pages/AddCard'], resolve) 
    },
    {
      path: '/Team',//团队合作
      name: 'Team',
      meta: {
        title: '团队合作'
      },
      component: resolve => require(['pages/Team'], resolve) 
    },
    {
      path: '/OrderList',//订单列表页
      name: 'OrderList',
      meta: {
        title: '订单列表'
      },
      component: resolve => require(['pages/OrderList'], resolve) 
    },
    {
      path: '/OrderDetial',//订单明细页
      name: 'OrderDetial',
      meta: {
        title: '订单明细'
      },
      component: resolve => require(['pages/OrderDetial'], resolve) 
    },
    {
      path: '/Test',//测试
      name: 'Test',
      meta: {
        title: '测试'
      },
      component: resolve => require(['pages/Test'], resolve) 
    }
  ]
})
